package com.jerkin.easyexcl.model;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.format.DateTimeFormat;

import cn.hutool.json.JSONUtil;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @version V1.0
 * @ClassName: InvoiceDetail
 * @Description:
 * @author: huhongzhi
 * @date: 2020/9/21 9:17
 */
public class InvoiceDetail {
    //业务单号
    private String bizNo;
    //康众编码
    private String kzSkuCode;
    //数量
    private Integer saleNum;
    //单价
    private BigDecimal price;
    //总价
    private BigDecimal totalPrice;
    //规格
    private String supplierCode;
    //俗称
    private String nickName;
    //三级分类id
    private String typeNo;
    //三级分类名称
    private String typeName;
    //一级分雷
    private String typeNo1;
    //一级分类名称
    private String typeName1;

    //容量
    private String accNum;
    //单位
    private String unit;
    //销售单号
    private String saleOrderId;

    //日期
    @DateTimeFormat("yyyy-mm-dd HH:mm:ss")
    @ExcelIgnore
    private Date date;
    //单号类型
    @ExcelIgnore
    private Integer type;
    //是否油品
    @ExcelIgnore
    private String flag;
    @ExcelIgnore
    private String oilUnit;
    @ExcelIgnore
    private String amount;

    public String getBizNo() {
        return bizNo;
    }

    public void setBizNo(String bizNo) {
        this.bizNo = bizNo;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getKzSkuCode() {
        return kzSkuCode;
    }

    public void setKzSkuCode(String kzSkuCode) {
        this.kzSkuCode = kzSkuCode;
    }

    public Integer getSaleNum() {
        return saleNum;
    }

    public void setSaleNum(Integer saleNum) {
        this.saleNum = saleNum;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getSupplierCode() {
        return supplierCode;
    }

    public void setSupplierCode(String supplierCode) {
        this.supplierCode = supplierCode;
    }

    public String getTypeNo() {
        return typeNo;
    }

    public void setTypeNo(String typeNo) {
        this.typeNo = typeNo;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getTypeNo1() {
        return typeNo1;
    }

    public void setTypeNo1(String typeNo1) {
        this.typeNo1 = typeNo1;
    }

    public String getTypeName1() {
        return typeName1;
    }

    public void setTypeName1(String typeName1) {
        this.typeName1 = typeName1;
    }

    public String getAccNum() {
        return accNum;
    }

    public void setAccNum(String accNum) {
        this.accNum = accNum;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getSaleOrderId() {
        return saleOrderId;
    }

    public void setSaleOrderId(String saleOrderId) {
        this.saleOrderId = saleOrderId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public String getOilUnit() {
        return oilUnit;
    }

    public void setOilUnit(String oilUnit) {
        this.oilUnit = oilUnit;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public static void main(String[] args) {
       List<InvoiceDetail> invoiceDetailList = new ArrayList<>();
       InvoiceDetail invoiceDetail = new InvoiceDetail();
       invoiceDetail.setSaleNum(2);
       invoiceDetailList.add(invoiceDetail);
       for(InvoiceDetail invoiceDetail1:invoiceDetailList){
           invoiceDetail1.setSaleNum(10);
       }
        System.out.println(JSONUtil.toJsonStr(invoiceDetailList));

    }
}
